package com.study.modules.sys.model.dto;

import com.study.common.validate.Update;
import com.study.modules.sys.model.entity.SysMenu;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

/**
 * @Author Mr.Du
 * @Date 2021/10/21 15:05
 */
@Data
public class SysRoleDTO {
    @NotNull(message = "角色id不能为空", groups = Update.class)
    public Long id;
    @Valid
    @NotBlank(message = "角色名字不能为空")
    @NotNull(message = "角色名字不能为空")
    @Pattern(regexp = "^[\\u4E00-\\u9FA5A-Za-z0-9\\*]*$", message = "角色名限制：最多10字符，包含文字、字母和数字！")
    public String name;
    public String remark;
    public Integer deleted;
    public Long createId;
    public Date createTime;
    public Long updateId;
    public Date updateTime;

    //菜单信息
    public List<SysMenu> menuList;
    //菜单id列表
    public String menuIdList;

}
